import { translateItemList as props } from '@/View/LeftView/interface';
import TranslateItem from '@/View/LeftView/translateItem';
import { Virtuoso as List } from 'react-virtuoso';
import React, { useState } from 'react';

const TranslateItemList: React.FC<props> = (props) => {
  const [listData, setListData] = useState(props.listData);
  return (
    <div>
      <List
        style={{ width: '100%', height: '100%' }}
        totalCount={listData.length}
        item={(index) => {
          return (
            <TranslateItem
              isComplete={listData[index].isComplete}
              textKey={listData[index].textKey}
              textValue={listData[index].textValue}
            ></TranslateItem>
          );
        }}
      ></List>
    </div>
  );
};

export default TranslateItemList;
